<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.util.*" %>
<jsp:useBean id="loginStudentsForm" scope="session" class="mypack.form.LoginStudentsForm"/>
<jsp:useBean id="loginStudentsAction" scope="session" class="mypack.action.LoginStudentsAction"/>
<jsp:useBean id="loginStudentsVo" scope="session" class="mypack.vo.LoginStudentsVo"/>
<%loginStudentsForm.setParameters(request,response);%>
<%loginStudentsAction.service(request,response,loginStudentsForm,loginStudentsVo); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>统一登陆认证</title>
 <!-- 新 Bootstrap 核心 CSS 文件 -->
			<link rel="stylesheet" href="static/css/bootstrap.min.css">
            <!-- 可选的Bootstrap主题文件（一般不用引入） -->
			<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">

            <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
			<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

			<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
			<script src="static/js/bootstrap.min.js"></script>
              <link href="static/css/login.css" rel="stylesheet" type="text/css" />
            <link href="static/css/homepage.css" rel="stylesheet" type="text/css" />
</head>

<body style="background-image: url(../static/images/appll.jpg);">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div id = "banner">
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active" style="color:#44484F;"><a href="http://localhost:8080/Final/index.jsp">首页</a></li>
                    <li role="presentation" ><a href="#" style="color:#44484F;">教师入口</a></li>
                    <li role="presentation"><a href="#" style="color:#44484F;">学生入口</a></li>
                    <li role="presentation"><a href="#" style="color:#44484F;">注销登录</a></li>
					<li role="presentation"><a href="#" style="color:#44484F;">修改密码</a></li>
                </ul>
            </div> 
            </nav>
               <div id = "inner1" style="width:400px;" >
            <div id = "input1" style="width:400px;">
<h1 style="margin-left:40px;">以下是登陆结果</h1>
      
    <p style="margin-left:40px;">用户名：<%=loginStudentsVo.getStudents().get(0).getSname() %></p></br>
   
    
    <p>
    <%
        if(loginStudentsVo.getStudents().get(0).getSname() == "登陆失败"){
            out.println("<p style=\"MARGIN-LEFT:40PX;\">"+"登陆失败" +"<br><br>");
            request.getSession().setAttribute("check_code",null); 
            out.print( " <a style=\"MARGIN-LEFT:40PX;\" class=\"btn btn-primary btn-lg\" role=\"button\" href='http://localhost:8080/Final/index.jsp'>请登录</a>");
        }
    
        else {
            
           request.getSession().setAttribute("check_code", loginStudentsVo.getStudents().get(0).getSname()); 
        
         
     %>
     <P style="MARGIN-LEFT:40PX;"> <%=loginStudentsVo.getStudents().get(0).getSname() %>同学欢迎你！</p>
     	   <a  class="btn btn-primary btn-lg" style="width:200px;MARGIN-LEFT:40PX;" role="button" href = "http://localhost:8080/Final/Student/selectTea.jsp" >选择任课教师</a></p>
       <a  class="btn btn-primary btn-lg" style="width:200px;MARGIN-LEFT:40PX;" role="button" href = "http://localhost:8080/Final" >返回首页</a></p>"
     <%
     }
     %>  
    </p>
    </div>
    </div>
       <div id="leftContainer" style="margin-top:400px;"> 
                    <p class = "copyright">Copyright © Sidan Yao. All rights reserved. </p>
					<p class = "copyrightE">     Email:1013748619@qq.com</p>
	   </div>
</body>
</html>